package com.bawei.library_base.mvvm;

import androidx.databinding.DataBindingUtil;
import androidx.databinding.ViewDataBinding;

/**
 * @author : zhiyu
 * @date :
 * @content :
 */
public abstract class BaseMVVMActivity<VM extends BaseViewModel,DB extends ViewDataBinding> extends BaseActivity {

    protected VM viewModel;
    protected DB dataBinding;

    @Override
    protected void initEnv() {
        dataBinding= DataBindingUtil.setContentView(this,bindLayout());
        viewModel=createViewModel();
    }

    protected abstract VM createViewModel();
}
